//
//  Community.m
//  YYZB
//
//  Created by 顾悦 on 16/3/21.
//
//

#import "Community.h"

@implementation Community

- (instancetype)initWithDictionary:(NSDictionary *)d {
    Community *item = [self class].new;
    item.provinceID = d[@"ProvinceId"];
    item.cityID = d[@"CityId"];
    item.ID = d[@"CommunityId"];
    item.name = d[@"CommunityName"];
    item.namePY = d[@"CommunityNamePY"];
    item.address = d[@"CommunityAddress"];
    item.longitude = d[@"Longitude"];
    item.latitude = d[@"Latitude"];
    return item;
}

- (instancetype)initWithName:(NSString *)name {
    Community *item = [self class].new;
    item.name = name;
    return item;
}

- (instancetype)initWithID:(NSString *)ID name:(NSString *)name {
    Community *item = [self class].new;
    item.ID = ID;
    item.name = name;
    return item;
}

@end
